package peer.rudp.command;

public class TransCOM2 extends Command{
	int length=0;
	public TransCOM2(int length){
		data=new byte[6];
		this.length=length;
		commandType=peer.tools.CommandType.command_TransCom2;
		peer.tools.ByteShortSwitch.toByteArray(commandType, data, 0);
		peer.tools.ByteIntSwitch.toByteArray(length, data, 2);
	}
	
	public TransCOM2(byte[] data){
		this.data=data;
		commandType=peer.tools.ByteShortSwitch.toShort(data, 0);
		length=peer.tools.ByteIntSwitch.toInt(data, 2);
	}
	
	public int getLength(){
		return length;
	}
}
